package com.sixnimmt.app.server.game.domain;

import java.io.Serializable;

import com.sixnimmt.app.server.game.domain.Player;
import com.sixnimmt.app.shared.game.domain.Card;

public class PlayerChoice implements Comparable<PlayerChoice>, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private final Player player;

	private final Card card;

	public PlayerChoice(Player player, Card card) {
		this.player = player;
		this.card = card;
	}

	public Player getPlayer() {
		return player;
	}

	public Card getCard() {
		return card;
	}

	@Override
	public int compareTo(PlayerChoice pc) {
		return this.getCard().getValue() - pc.getCard().getValue();
	}

	@Override
	public String toString() {
		return player.getName() + ": " + card.toString();
	}

}
